import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
import commonState from './common/state'
import commonActions from './common/actions'
import commonGetters from './common/getters'
import commonMutations from './common/mutations'

import persistedState from 'vuex-persistedstate'

export default new Vuex.Store({
    plugins:[persistedState({ storage: window.sessionStorage })],
    modules:{
        common:{
            namespaced:true,
            state:commonState,
            mutations:commonMutations,
            actions:commonActions,
            getters:commonGetters
        }
    },
    
})